package com.acminds.acuteauto.persistence.entities;

// Generated Jun 28, 2012 7:39:42 PM by Hibernate Tools 3.4.0.CR1

import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

import com.acminds.acuteauto.persistence.dto.*;

/**
 * AuditLog generated by customhbm2java
 */
@MappedSuperclass
public abstract class AbstractAuditLog extends
		com.acminds.acuteauto.persistence.BaseDTO implements
		java.io.Serializable {

	private static final long serialVersionUID = 1L;

	private Integer auditLogId;
	private int auditType;
	private String entityName;
	private int entityId;
	private String auditData;
	private UserInfo createdBy;

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "AUDIT_LOG_ID", unique = true, nullable = false)
	public Integer getAuditLogId() {
		return this.auditLogId;
	}

	public void setAuditLogId(Integer auditLogId) {
		this.auditLogId = auditLogId;
	}

	@Column(name = "AUDIT_TYPE", nullable = false)
	public int getAuditType() {
		return this.auditType;
	}

	public void setAuditType(int auditType) {
		this.auditType = auditType;
	}

	@Column(name = "ENTITY_NAME", nullable = false, length = 100)
	public String getEntityName() {
		return this.entityName;
	}

	public void setEntityName(String entityName) {
		this.entityName = entityName;
	}

	@Column(name = "ENTITY_ID", nullable = false)
	public int getEntityId() {
		return this.entityId;
	}

	public void setEntityId(int entityId) {
		this.entityId = entityId;
	}

	@Column(name = "AUDIT_DATA", length = 1000)
	public String getAuditData() {
		return this.auditData;
	}

	public void setAuditData(String auditData) {
		this.auditData = auditData;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CREATED_BY", nullable = false)
	public UserInfo getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(UserInfo createdBy) {
		this.createdBy = createdBy;
	}

}
